#include<stdio.h>
int main()
{
	int mon=0;
	
	
	scanf_s("%d", &mon);
	int total = mon;
	int emp = mon;
	while (emp >= 2)
	{

		
		total += emp / 2;
		emp = emp / 2 + emp % 2;

	}
	printf("%d", total);
}